<template>
  <div class="container">
    <div class="select-item">
      <uplader-preview @after-read="afterRead" :method="'album'" />
      相册
    </div>
    <div class="select-item">
      <uplader-preview @after-read="afterRead" :method="'camera'" />
      拍照
    </div>
    <div class="select-item" @click="selectOrder">
      <img src="../images/order-icon.png" />
      订单
    </div>
  </div>
</template>

<script>
import UpladerPreview from './uplader-preview.vue';

export default {
  name: 'multi-select',
  components: {
    UpladerPreview
  },
  methods: {
    selectOrder() {
      this.$emit('showOrderPopup');
    },
    afterRead(fileObj) {
      this.$emit('after-read', fileObj);
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  height: 169px;
  background: #ffffff;
  border-top: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-around;
  align-items: center;
  .select-item {
    width: 60px;
    height: 84px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(102, 102, 102, 1);
    line-height: 17px;
    img {
      width: 60px;
      height: 60px;
    }
  }
}
</style>
